package com.zengfa.task.client.model;

import java.util.BitSet;
import java.util.List;

import lombok.Data;

/**
 * 任务定义
 * @author 曾法
 * @since 2025-01-08 15:25:42
 */
@Data
public class TaskDefine {

	/**
	 * 任务名称
	 */
	private String taskName;
	
	/**
	 * 流程节点
	 */
	private List<FlowNodeDefine> defineFlowNodes;
	
	/**
	 * 任务回调
	 */
	private TaskCallbackDefine taskCallbackDefine;
	
	private BitSet bs;
	
	public FlowNodeDefine getDefineNode(String nodeCode) {
		for (FlowNodeDefine node : defineFlowNodes) {
			if (nodeCode.equals(node.getCode())) {
				return node;
			}
		}
		return null;
	}
	
}
